import * as iconv from "iconv-lite"

function test_1() {
    const s1 = "abc哈哈哈"
    const buffer1 = iconv.encode(s1, "utf-8")

    const s2 = iconv.decode(buffer1, "gbk")
    console.log(s2)

    console.log("--------------------")

    const s3 = "abc哈哈哈"
    const buffer3 = iconv.encode(s3, "gbk")

    const s4 = iconv.decode(buffer3, "utf-8")
    console.log(s4)

    console.log(globalThis)
}

export function test_iconv() {
    console.log("===> test_iconv")
    test_1()
}